home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 30 / PC Gamer IT CD 30 1-2.iso / MOTS / GAMEDATA / EPISODE / JKM_PCG.GOO / cog_s1l2_shipexplode2.cog < prev    next >
Encoding:
Text File  |  1998-02-25  |  851 b   |  54 lines

  1. # Jedi Knight Cog Script
  2. #
  3. # S1L2_shipexplode2.COG
  4. #
  5. # Ship explosion for end of level S4L2
  6. #
  7. # [DB]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10.  
  11. symbols
  12.  
  13. message        damaged
  14.  
  15. thing        ship                    mask=-1
  16.  
  17. sound        shipcrack
  18. sound        shipexplode
  19.  
  20. thing        ghost0
  21. thing        ghost1
  22. thing        ghost2
  23.  
  24. template    explosion_tpl=+tiei_exp         local
  25.  
  26. flex            curdamage=0                     local
  27. flex        damage
  28.  
  29. end
  30.  
  31.  
  32. code
  33.   
  34. damaged:
  35.  
  36.    curdamage=curdamage + GetParam(0);
  37.  
  38.    if (curdamage<damage) Return;
  39.  
  40.     DestroyThing(ship);
  41.     playsoundpos(shipexplode, getthingpos(ship), 1.0, -1, -1, 0);
  42.  
  43.     // make 3 ghost objects explode with raildet explosion
  44.     CreateThing(explosion_tpl, ghost0);
  45.     Sleep(0.05);
  46.    CreateThing(explosion_tpl, ghost1);
  47.    Sleep(0.05);
  48.    CreateThing(explosion_tpl, ghost2);
  49.  
  50.     return;
  51.  
  52. end
  53.  
  54.